package com.home;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @projectName: petJoyHome
 * @author: 小飞
 * @description: TODO
 * @date: 2024/3/2 17:27
 * @version: 1.0
 */
@SpringBootTest
public class test1 {
    @Autowired
    private PasswordEncoder passwordEncoder;

    @Test
    public void test1(){
        boolean matches = passwordEncoder.matches("123456", "$2a$10$uHd44XEQCm88XUDu74dgHOk.qFKL9gMr0II0KaCAj8pdXDmpgh4je");
        System.out.println(matches);
    }
}
